package com.testTimeTag;

import java.util.Date;
/**
 * 12点前的最后次打卡时间和12点后的第一次打卡时间
 * @author KK
 *
 */
public class Record12OneDay {
	private Date date1=null;
	private Date date2=null;
	private Date date=null;
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	protected Record12OneDay() {
	
	}
	public Date getDate1() {
		return date1;
	}
	public Date getDate2() {
		return date2;
	}
	public void setDate1(Date date1) {
		this.date1 = date1;
		if(date1!=null){
			date=date1;
		}
	}
	public void setDate2(Date date2) {
		this.date2 = date2;
		if(date==null && date2!=null){
			date=date2;
		}
	}
	public String toString(){
		return "下班卡："+(date1!=null?Test.df.format(date1):null)+",上班卡："+(date2!=null?Test.df.format(date2):date2);
	}
}